package airplane.utils;

import airplane.obj.BoosShellObj;
import airplane.obj.EnemyObj;
import airplane.obj.GameObj;
import airplane.obj.ShellObj;

import java.awt.*;
import java.util.ArrayList;

public class GameUtils {

    public static String able = ""; // /Users/asea/PhpstormProjects/new_project/my_project/airplaneWar/
    // 背景图片
    public static Image bgImg = Toolkit.getDefaultToolkit().getImage(able + "imgs/space.jpg");

    // boos 照片
    public static Image boosImg = Toolkit.getDefaultToolkit().getImage(able + "imgs/boss.png");

    // 爆炸图片
    public static Image explodeImg = Toolkit.getDefaultToolkit().getImage(able + "imgs/explode/e10.gif");

    // 我方战斗机的图片
    public static Image planeImg = Toolkit.getDefaultToolkit().getImage(able + "imgs/plane.png");

    // 敌方战斗机的图片
    public static Image enemyImg = Toolkit.getDefaultToolkit().getImage(able + "imgs/enemy.png");
    // 我方子弹
    public static Image shellImg = Toolkit.getDefaultToolkit().getImage(able + "imgs/bulletGreen.png");
    // 我方子弹
    public static Image boosShellImg = Toolkit.getDefaultToolkit().getImage(able + "imgs/bulletYellow.png");
    // 所有游戏物体集合
    public static java.util.List<GameObj> gameObjList = new ArrayList<>();
    // 所有要删除游戏物体集合
    public static java.util.List<GameObj> removeObjList = new ArrayList<>();
    // 我方子弹集合
    public static java.util.List<ShellObj> shellObjList = new ArrayList<>();
    // 敌方战斗机集合
    public static java.util.List<EnemyObj> enemyObjList = new ArrayList<>();
    // 爆炸集合集合
    public static java.util.List<EnemyObj> explodeObjList = new ArrayList<>();
    // 敌方子弹集合
    public static java.util.List<BoosShellObj> boosShellObjList = new ArrayList<>();

    // 绘制字符串的工具类
    public static void drawWord(Graphics graphics, String text, Color color, int size, int x, int y) {
        graphics.setColor(color);
        graphics.setFont(new Font("黑体", Font.BOLD, size));
        graphics.drawString(text, x, y);
    }
}
